.TH E1432_SET_TRIGGER_DELAY 3 E1432
.SH NAME
.nf
e1432_set_trigger_delay \- Set trigger delay
e1432_get_trigger_delay \- Get current trigger delay
.fi
.IX e1432_set_trigger_delay(3) 3
.IX e1432_get_trigger_delay(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_trigger_delay(E1432ID hw, SHORTSIZ16 ID,
                                   LONGSIZ32 delay)
SHORTSIZ16 e1432_get_trigger_delay(E1432ID hw, SHORTSIZ16 ID,
                                   LONGSIZ32 *delay)
.cE
.SH DESCRIPTION
\fIe1432_set_trigger_delay\fR sets the trigger delay,
of a single channel or group of channels \fIID\fR,
to the value given in \fIdelay\fR.

\fIe1432_get_trigger_delay\fR returns the current value of the delay,
of a single channel or group of channels \fIID\fR, into a memory
location pointed to by \fIdelay\fR.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained with a
call to \fIe1432_create_channel_group\fR, or the ID of a single channel.

\fIdelay\fR is the elapsed time, in number of samples, between the
occurrence of a trigger and the beginning of the data acquisition.  A
negative delay indicates a pre-trigger condition, where samples prior
to the trigger event are included in the first measurement block.  The
minimum and maximum values for this parameter vary depending on the
amount of ram and the number of active channels in the E1432 modules.
This parameter may also be set with \fIe1432_set_trigger\fR.

\fBNOTE:\fR When order tracking is enabled with the
\fRe1432_set_calc_data\fR, or when doing RPM arming (set by
\fIe1432_set_arm_mode\fR) there are only three valid trigger delay
values:

.nf
    0               trigger is at the beginning of the block of data
    -blocksize/2    trigger is at the middle of the block of data
    -blocksize      trigger is at the end of the block of data
.fi

and any other values will be flagged as an illegal trigger delay value
when the measurement is started.

\fBNOTE:\fR Use of a trigger delay other then 0 with Octave measurements
(as set with \fIe1432_set_octave_mode\fR) will have indeterminate results.

When the data size is set to \fBE1432_DATA_SIZE_16\fR, then the
\fIdelay\fR will be rounded down to an even number.
.SH "RESET VALUE"
After a reset, \fIdelay\fR is set to \fB0\fR.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_arm_mode, e1432_set_calc_data, e1432_set_trigger,
e1432_get_trigger_delay_limits
.ad
